#pragma once
#include "common.hpp"

class robot_devio:public robot_driver
{
public:
    enum Direct {input, output};
    enum Pull {low, high};
    friend void io_input_irq_call(void* args);
public:
    robot_devio(rt_base_t pin_num, Direct dir, Pull pu=high);
    virtual ~robot_devio();
    void open();
    
protected:
    struct rt_semaphore irq_sem;

private:
    rt_base_t pin_n;
    
};